/************************************************************
 * Project Name		[Thinking_In_Java]
 * File Name     	[pkg_02_oop.Example_01_Employee_Test.java]
 * Creation Date 	[15-Jun-2014]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ************************************************************/
package pkg_02_oop;

/**
 * Example_01_Employee test
 * 
 * @author 不落的太阳(Sean Yang)
 * @version 1.0
 * @since JDK 6
 * @see Example_01_Employee
 */
public class Example_01_Employee_Test {

	/**
	 * 测试方法
	 * 
	 * @param args
	 *            命令行参数
	 */
	public static void main(String[] args) {
		/**
		 * new 关键字在生成对象时 了三件事情<br>
		 * 为对象分配内存空间<br>
		 * 调用类的构造方法<br>
		 * 将生成对象的地址返回<br>
		 */
		Example_01_Employee[] staff = new Example_01_Employee[3];
		staff[0] = new Example_01_Employee("Sean Yang", 75000, 2011, 6, 20);
		staff[1] = new Example_01_Employee("Ge Yang", 75000, 2011, 6, 20);
		staff[2] = new Example_01_Employee("anonymous", 100000, 2000, 1, 1);

		for (Example_01_Employee employee : staff) {
			employee.raiseSalary(10);
		}

		for (Example_01_Employee employee : staff) {
			System.out.println(employee);
		}
	}
}
